CC = c++
SUFFIX = .cpp
EXE = client
SRC = main
COMMON_PATH = ../common/
COMMON_SRC = my_daemon args network_tools

.PHONY:all clean

all:$(EXE)

$(EXE):$(SRC)$(SUFFIX) $(foreach N, $(COMMON_SRC), $N.o)
	$(CC) -Wall -o $@ $^

%.o:$(COMMON_PATH)%$(SUFFIX)
	$(CC) -Wall $^ -c -o $@

clean:
	rm -f *.o $(EXE)